<?php namespace Phpcmf\Controllers\Member;

class Home extends \Phpcmf\Member\Module
{

	// 内容列表
	public function index() {
		$this->_Member_List();
	}

	public function add() {
		//获取post数据
		$data = \Phpcmf\Service::L('Input')->post('data');
		$money = $this->member['money'];
		if(!$data['content']) {
			$this->_json(0, '内容不能为空');
		}
		if(!$data['shangjin'] || $data['shangjin'] == '' || $data['shangjin'] == 'undefined') {
			$this->_json(0, '赏金不能为空',$money);
		}
		if($data['shangjin'] > $money) {
			$this->_json(0, '赏金不能大于余额',$money);
		}
		
		
		
		$this->_Member_Add();
	}

	public function edit() {
		$this->_Member_Edit();
	}

	public function del() {
		$this->_Member_Del();
	}
}
